#ifndef RECIPIENT_H
#define RECIPIENT_H
#include <QString>
#include <QHash>
#include <QList>


struct CRecipient
{
    QString phone;
    QString name;

    bool operator == (const CRecipient &v)
    {
	return ((phone == v.phone)&&(name==v.name));
    }
};

typedef QList<CRecipient*> RecipientGroup;

class FUserBase
{
private:
    QHash<QString,CRecipient*> RecipientList;
    QHash<QString,RecipientGroup> RecipientGroups;
public:
    FUserBase(){}

    void addUser(CRecipient* user);
    void addUserToGroup(QString user, QString group);
    void cleanAll();

    RecipientGroup allUsers();
    RecipientGroup members(QString groupName);
};

#endif // RECIPIENT_H
